function Editor(frame,textarea) {
	var new_editor = new Object();
	
	new_editor.frame = document.getElementById(frame);
	new_editor.textarea = document.getElementById(textarea);
	
	new_editor.parse_values = function(textarea){
		this.change_display();
		var block = this.get_where_display_like('block');
		var hidden = this.get_where_display_like('none');
		if (hidden == this.textarea)
			block.contentWindow.document.body.innerHTML = hidden.value;
		else
			block.value = hidden.contentWindow.document.body.innerHTML;
	}
	new_editor.change_display = function(){
		b1 = this.get_where_display_like('block');
		b2 = this.get_where_display_like('none');
		b1.style.display = 'none';
		b2.style.display = 'block';
	}
	new_editor.get_where_display_like = function(display){
		if (this.frame.style.display==display)
			return this.frame;
		else
			return this.textarea;
	}
	new_editor.change_content = function(command,attr){
		this.frame.contentWindow.document.execCommand(command,false,attr);
	}
	
	new_editor.frame.contentWindow.document.designMode = 'On';
	
	return new_editor;
}